home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / prog / atari / c / stut_src / arb_gen.c < prev    next >
Text File  |  1996-05-27  |  1KB  |  65 lines

  1. /*
  2.  * Arb_Gen.c
  3.  *
  4.  * Fonction g‚n‚rales de traitement d'arho
  5.  *
  6.  * 25.03.95: Created
  7.  */
  8.     #include "!OPTIONS.H"                /* Options de compilation */         
  9.     #define    THIS_FILE    "ARB_GEN.C v1.00 - 03.95"
  10.           
  11. /*
  12.  * System headers:
  13.  */
  14.     #include    <stdio.h>
  15.     #include    <string.h>                    /* Memcpy etc... */
  16.     
  17. /*
  18.  * Custom headers:
  19.  */
  20.     #include    "DEF_ARBO.H"
  21.  
  22.     #include    "SPEC_PU.H"
  23.     #include    "DEBUG_PU.H"    
  24.  
  25.  
  26.  
  27. /*
  28.  * ------------------
  29.  */
  30.  
  31.  
  32.  
  33.  
  34. /*
  35.  * fnct_spec(-)
  36.  *
  37.  * Purpose:
  38.  * --------
  39.  * Trouve adr des sp‚cification associ‚es … une fonction
  40.  *
  41.  * History:
  42.  * --------
  43.  * 1993: fplanque: Created
  44.  */
  45. FNCTSPEC    *fnct_spec( 
  46.                 FNCTSPEC *fnctspec, 
  47.                 int fnct )
  48. {
  49.     int    i;
  50.  
  51.     for ( i=0; i<1000; i++ )            /* 1000= anti bug Stupide! */
  52.     {
  53.         if ( fnctspec[ i ] .fnct_no == fnct )
  54.             break;
  55.     };
  56.     if ( i == 1000 )
  57.     {    /* Si pas trouv‚ */
  58.         signale("Fonction iconnue/n");
  59.         return    fnctspec;        /* Renvoie adr 1ere fonction */
  60.     }
  61.     else
  62.     {
  63.         return    &fnctspec[ i ];
  64.     }
  65. }